package com.xian.java.bean;

import com.xian.util.MyDateUtils;

import java.util.Date;

public class Person {
    private int id;
    private String name;
    private Date birthdy;

    //空参 构造方法
    public Person() {
    }

    //全参 构造方法
    public Person(int id, String name, Date birthdy) {
        this.id = id;
        this.name = name;
        this.birthdy = birthdy;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBirthdy() {
        return birthdy;
    }

    public void setBirthdy(Date birthdy) {
        this.birthdy = birthdy;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthdy=" + MyDateUtils.date2string(birthdy) +
                '}';
    }
}
